﻿using System;
using DataObject;
using DataObject.Adv;

namespace KMT.Controls.Common.Adv
{
    public partial class AdvLeft : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                GetAdvSingle();
        }

        private void GetAdvSingle()
        {
            var o = AdvController.Adv_GetAdvSingle();
            if (o != null)
                ltAdvSingle.Text = string.Format("{0}/Thumb.ashx?Id={1}&tId={2}&Size={3}", Constants.ThumbImage, o.AdvId, (int)CategoryType.Adv, 180);
        }
    }
}